home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 176-200 / scopedisk192 / atomclockv1.2a / atomdoc < prev    next >
Text File  |  1995-03-19  |  8KB  |  208 lines

  1. AtomClock V.1.2a by Art Steinmetz
  2. Compuserve ID: 76044,3204 or FidoNet Amiga Echos
  3.  
  4. INTRODUCTION
  5.  
  6. AtomClock will dial the U.S. Naval Observatory in Washington D.C., read the
  7. 1200 BAUD time signal their atomic clock puts out and set the Amiga system
  8. clock accordingly.  It runs from Workbench or CLI.  The default
  9. configuration will work with a Hayes-type modem but parameters can be
  10. adjusted for just about any modem.  ATMCLK.ZOO contains only the
  11. executable.  ACSRC.ARC contains the full source code.  Written in Benchmark
  12. Modula 2.  Good example of serial port access and reading icon TOOLTYPES.
  13.  
  14.  
  15. QUICKSTART (absolute minimum docs)
  16.  
  17. If you run from CLI you MUST increase your stack above the default of 4000.
  18. To do this type STACK 10000 from the CLI.
  19.  
  20. If you have a Hayes-Type Modem and live on Eastern Standard Time you are
  21. ready to go.  Click on the icon and sit back.  If it is Daylight Savings or
  22. you live in a different zone you must change this parameter.  Use INFO from
  23. the Workbench menu and change the TimeZone TOOLTYPE from EST to your zone
  24. (e.g. PDT, MST, etc).  Alternatively you can use the "z" argument from CLI.
  25.  
  26.     ATOMCLOCK Z/EDT
  27.  
  28. will run AtomClock and set your Amiga for Eastern Daylight Time.  That's
  29. it.
  30.  
  31. It is your responsibility to set the hardware clock or the Amiga will
  32. forget the newly set time when you turn it off. There are so many hardware
  33. clocks out there I opted against including that feature in the program.  If
  34. you have an Amiga 2000 or A500/A501 open a CLI and type SETCLOCK OPT SAVE
  35. after you run ATOMCLOCK or click on the HARDSET icon included.  HARDSET
  36. will do the job from Workbench.
  37.  
  38. Note that with the exception of unZOOing this darn thing you don't EVER
  39. have to use CLI.
  40.  
  41. AtomClock recognizes those time zones between Eastern and Pacific, daylight
  42. or standard.  It also knows GMT or UTC. If you live outside read on.
  43.  
  44. If you have an uncommon modem read on.
  45.  
  46. For some modest AREXX support read on.
  47.  
  48. FILES SUPPLIED IN THIS ARCHIVE
  49.  
  50. ATMCLK.ZOO
  51.     AtomClock        /* the program. */
  52.     AtomClock.info
  53.     AtomDoc        /* this file */
  54.     AtomDoc.info
  55.     HardSet         /* sets hardware clock to system time */
  56.     HardSet.info  
  57.     SetTime.rexx         /* AREXX script for once a month sets */
  58.     SetTime.rexx.info
  59.  
  60.  
  61. ALSO LOOK FOR (not included here)
  62.  
  63. ATMSRC.ARC
  64.     AmigaTime.def        by Mark Olbert
  65.     AmigaTime.mod        by Mark Olbert
  66.     AtomClock.mod
  67.     AtomDoc
  68.     AtomUtils.def
  69.     AtomUtils.mod
  70.     GetAtomParams.def
  71.     GetAtomParams.mod
  72.     Serial.def        by Steve Faiwiszewski
  73.     Serial.mod          by Steve Faiwiszewski
  74.     StringUtils.def        by Mark Olbert
  75.     StringUtils.mod        by Mark Olbert
  76.     Time.def        by Mark Olbert
  77.     Time.mod        by Mark Olbert
  78.     makeatom        list of files in proper compilation order
  79.  
  80. INSTRUCTIONS
  81.  
  82. Every possible parameter of ATOMCLOCK can be set by command line arguments
  83. and/or TOOLTYPES in the INFO record from Workbench.
  84.  
  85. To change any parameter from Workbench select the AtomClk icon and choose
  86. INFO from the Workbench menu.  The TOOLTYPES field has up and down arrows
  87. you can click on to scroll through the parameter list.  Find the one you
  88. want to change and click on the text.  Change only the text to the RIGHT of
  89. the equals sign.  For instance, in April, you would want to adjust AtomClk
  90. for daylight savings time so you would change TimeZone=EST to TimeZone=EDT.
  91. When you are done hit the Return key and click on SAVE.
  92.  
  93. If you use the CLI you change parameters when you run AtomClk with command
  94. line parameters.  Each arg. is represented by a single letter followed by a
  95. slash followed by the parameter.  For example if you currently are living on
  96. Central Standard Time you will invoke AtomClk by typing:
  97.  
  98.     ATOMCLK z/CST
  99.  
  100. Arguments can be in any order.  Unlike the Workbench INFO method, parameter
  101. changes are not saved so you have to use the same argument each time.  For
  102. this reason a batch file is recommended if you have a lot of parameter
  103. changes.
  104.  
  105. The various parameters are below.  99% of you will only have to change the
  106. time zone parameter...ever (I hope).
  107.  
  108. TOOLTYPE       CLI       FUNCTION            DEFAULT
  109. --------       ---       ----------------------------    -----------
  110. TimeZone    z     Time zone (i.e. EST, PDT).    EST
  111.             Use GMT with "o" flag below 
  112.             if zone    is not  range EDT..PST.
  113.  
  114. Offset        o     Hours offset from GMT.  Ignore    -5
  115.             if you live in a supported
  116.             time zone.
  117.  
  118. BAUD        b     BAUD rate.            1200
  119. PhoneNumber    n     Phone number            1-202-653-0351
  120. Prefix        p     Modem dial prefix        ATDT
  121. Reset        r     Modem reset string        ATZ^M
  122. Calls        c    Max call attempts        3
  123. Tries        t     Try to read X lines before      20
  124.             giving up (avoids reading 
  125.             line noise forever).
  126.  
  127. Suffix        s     Modem dial suffix        ^M (Enter)
  128. Busy         b    Modem 'busy' message.        BUSY
  129. NoAnswer    w     Modem 'no answer' message.    NO CARRIER
  130.  
  131. Typing ATOMCLOCK without any arguments is equivalent to typing
  132.     ATOMCLOCK z/EST o/-5 b/1200 n/1-202-653-0351 p/ATDT r/ATZ^M c/3 t/20
  133.          s/^M b/BUSY w/NO CARRIER
  134.  
  135. A word about time zones for those of you not living between New York and
  136. L.A.  You have to calculate how many zones you are from Greenwich, England
  137. yourself.  Suppose you hang out in Paris, one zone west (I suppose) from
  138. Greenwich Mean Time.   You would make the TimeZone GMT (or UTC) and make
  139. the Offset 1.  From CLI: ATOMCLK z/GMT o/1.  Nothing to it.
  140.  
  141. DISTRIBUTION ARCHIVE NOTES
  142.  
  143. I've tried to make this as "Workbenchable" as possible.  Aside from the
  144. program being runnable from Workbench, an icon for the docs to use the tool
  145. c:MORE is included.  You can dump MORE if you know what you're doing. 
  146. HARDSET is batch file runable from WB. Its icon calls C:XICON.
  147.  
  148. PROGRAMMING NOTES
  149.  
  150. This was an exercise in the, well, modularity of Modula 2.  This was a
  151. fairly simple project because I didn't do a lot of the work.  I took off
  152. the shelf modules written by other folks and just linked 'em in. They do
  153. the low level work of the program while I just designed and wrote the front
  154. end.  The readability of Modula makes this a snap to do with even sparsely
  155. commented code.
  156.  
  157. Authors of the routines used here are equal (if unknowing) partners in the
  158. venture.  Mark Olbert provided the date and string routines. Steve
  159. Faiwiszewski provided the rather tricky (read "way over my head") serial
  160. port routines.  Thanks also to Steve for help with support for generic
  161. modems.  Any remaining bugs are, of course, my fault but your tough luck
  162. (Hey, the source is free).
  163.  
  164. All of my code is placed in the public domain.  Enjoy.  Steve and Mark have
  165. appropriate notices in their code.  Everything in this distribution archive
  166. is freely redistributable.
  167.  
  168. -- Art Steinmetz 9/24/88
  169.  
  170. --------
  171. Changes to version 1.1
  172.  
  173. Doc file amended to note file name change requirement and CLI stack
  174. requirements.
  175.  
  176. AtomClock now sets a CLI return code greater than zero if it does not
  177. succeed in changing system time.  A bug in AmigaDOS means this isn't useful
  178. unless you're running a command shell that will read it.  WShell and AREXX
  179. can make use of this.  A return code of 0 means the system time was set.  A
  180. return code of one (1) means that the user hit the close gadget and the
  181. time probably wasn't set.  A higher return code means some other failure
  182. occured.
  183.  
  184. If you have AREXX and WShell a script file provided will run atomclock once
  185. a month and set the hardware clock.
  186.  
  187. -- Art Steinmetz 10/16/88
  188.  
  189. --------
  190. Changes to version 1.2a
  191.  
  192. This archive is now distributed only in ZOO compression format.  This
  193. eliminates the problem a lot of people were having with the name in the
  194. ARCed version being truncated.  Originally the program had to be named
  195. ATOMCLOCK since the name was hard coded in it.  BAD, BAD BAD, Art!  Never
  196. hard code ANYTHING the user can change (w/o using NewZap, anyway).  Now
  197. AtomClock looks to see what its name is.
  198.  
  199. The Prefix Tooltype (and CLI p/ option) is now AT&D2DT.  This should
  200. force the modem to hang up properly.  If your modem does not understand
  201. the &D2 command find out if it can be commanded to hang up on a change in
  202. DTR stat and put that in the prefix.
  203.  
  204. MORE and IXECUTE are no longer included since the Amiga 1.3 command set
  205. includes MORE and XICON.
  206.  
  207. -- Art Steinmetz 5/30/89
  208.